﻿<Page x:Class="MediaLibrary.MusicPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="MusicPage" 
    Width="Auto" 
    Height="Auto">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition />
        </Grid.ColumnDefinitions>

        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition Height="30" />
        </Grid.RowDefinitions>

        <TabControl Grid.Row="0" Grid.Column="0" Background="Transparent">
            <TabItem Header="artist view" Background="Transparent" FontSize="14">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="200" />
                        <ColumnDefinition Width="250" />
                        <ColumnDefinition Width="*" />
                    </Grid.ColumnDefinitions>

                    <DataGrid 
                        x:Name="artistListBox" 
                        HeadersVisibility="Column" 
                        SelectionMode="Extended" 
                        AutoGenerateColumns="False" 
                        Background="White" 
                        GridLinesVisibility="None" 
                        SelectionChanged="artistListBox_SelectionChanged"
                        IsTextSearchEnabled="True" 
                        RowStyle="{StaticResource dataGridRowStyle}"
                        ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                        Grid.Row="1" 
                        Grid.Column="0">
                        <DataGrid.ContextMenu>
                            <ContextMenu>
                                <MenuItem Header="Add to Now Playing" Click="addToNowPlayingArtist_OnClick" />
                                <MenuItem Header="Replace now playing with selection" Click="replaceNowPlayingArtist_OnClick" />
                                <Separator />
                                <MenuItem Header="Playlists">
                                    <MenuItem Header="Add to New Playlist" Click="addToNewPlaylistArtist_OnClick" />
                                    <MenuItem Header="Add to Playlist" Click="addToPlaylistArtist_OnClick" />
                                </MenuItem>
                                <Separator />
                                <MenuItem Header="Edit Artist Information" Click="editArtistInformation_OnClick" />
                                <Separator />
                                <MenuItem Header="Delete">
                                    <MenuItem Header="Delete from Library" Click="deleteFromLibraryArtist_OnClick" />
                                    <MenuItem Header="Delete from Library and Computer" Click="deleteFromLibraryComputerArtist_OnClick" />
                                </MenuItem>
                            </ContextMenu>
                        </DataGrid.ContextMenu>

                        <DataGrid.Columns>
                            <DataGridTextColumn Header="artist" Binding="{Binding Tag.AlbumArtist}" IsReadOnly="True" HeaderStyle="{StaticResource dataGridHeaderStyle}" />
                        </DataGrid.Columns>
                    </DataGrid>

                    <DataGrid 
                        x:Name="albumListBox" 
                        HeadersVisibility="Column" 
                        SelectionMode="Extended" 
                        AutoGenerateColumns="False" 
                        Background="White" 
                        GridLinesVisibility="None" 
                        SelectionChanged="albumListBox_SelectionChanged" 
                        Grid.Row="1" 
                        RowStyle="{StaticResource dataGridRowStyle}"
                        ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                        Grid.Column="1">
                        <DataGrid.ContextMenu>
                            <ContextMenu>
                                <MenuItem Header="Add to Now Playing" Click="addToNowPlayingAlbum_OnClick" />
                                <MenuItem Header="Replace now playing with selection" Click="replaceNowPlayingAlbum_OnClick" />
                                <Separator />
                                <MenuItem Header="Playlists">
                                    <MenuItem Header="Add to New Playlist" Click="addToNewPlaylistAlbum_OnClick" />
                                    <MenuItem Header="Add to Playlist" Click="addToPlaylistAlbum_OnClick" />
                                </MenuItem>
                                <Separator />
                                <MenuItem Header="Edit Album Information" Click="editAlbumInformation_OnClick" />
                                <Separator />
                                <MenuItem Header="Delete">
                                    <MenuItem Header="Delete from Library" Click="deleteFromLibraryAlbum_OnClick" />
                                    <MenuItem Header="Delete from Library and Computer" Click="deleteFromLibraryComputerAlbum_OnClick" />
                                </MenuItem>
                            </ContextMenu>
                        </DataGrid.ContextMenu>

                        <DataGrid.Columns>
                            <DataGridTemplateColumn Header="album" IsReadOnly="True" HeaderStyle="{StaticResource dataGridHeaderStyle}">
                                <DataGridTemplateColumn.CellTemplate>
                                    <DataTemplate>
                                        <StackPanel Orientation="Horizontal">
                                            <TextBlock Text="{Binding Tag.Album}" /><TextBlock Text=" - (" /><TextBlock Text="{Binding Tag.Year}" /><TextBlock Text=")" />
                                        </StackPanel>
                                    </DataTemplate>
                                </DataGridTemplateColumn.CellTemplate>
                            </DataGridTemplateColumn>
                        </DataGrid.Columns>
                    </DataGrid>

                    <DataGrid 
                        x:Name="trackListBox" 
                        HeadersVisibility="Column" 
                        SelectionMode="Extended" 
                        AutoGenerateColumns="False" 
                        Background="White" 
                        GridLinesVisibility="Vertical" 
                        SelectionChanged="trackListBox_SelectionChanged" 
                        RowStyle="{StaticResource dataGridRowStyle}"
                        Grid.Row="1" 
                        Grid.Column="2">
                        <DataGrid.ContextMenu>
                            <ContextMenu>
                                <MenuItem Header="Add to Now Playing" Click="addToNowPlayingTrack_OnClick" />
                                <MenuItem Header="Replace now playing with selection" Click="replaceNowPlayingTrack_OnClick" />
                                <Separator />
                                <MenuItem Header="Playlists">
                                    <MenuItem Header="Add to New Playlist" Click="addToNewPlaylistTrack_OnClick" />
                                    <MenuItem Header="Add to Playlist" Click="addToPlaylistTrack_OnClick" />
                                </MenuItem>
                                <Separator />
                                <MenuItem Header="Edit Track Information" Click="editTrackInformation_OnClick" />
                                <Separator />
                                <MenuItem Header="Delete">
                                    <MenuItem Header="Delete from Library" Click="deleteFromLibraryTrack_OnClick" />
                                    <MenuItem Header="Delete from Library and Computer" Click="deleteFromLibraryComputerTrack_OnClick" />
                                </MenuItem>
                            </ContextMenu>
                        </DataGrid.ContextMenu>

                        <DataGrid.Columns>
                            <DataGridTextColumn Header="track" Binding="{Binding Tag.Track}" IsReadOnly="True" HeaderStyle="{StaticResource dataGridHeaderStyle}"  />
                            <DataGridTextColumn Header="title" Binding="{Binding Tag.Title}" IsReadOnly="True" HeaderStyle="{StaticResource dataGridHeaderStyle}" />
                            <DataGridTextColumn Header="genre" Binding="{Binding Tag.Genre}" IsReadOnly="True" HeaderStyle="{StaticResource dataGridHeaderStyle}" />
                            <DataGridTextColumn Header="play count" Binding="{Binding PlayCount}" IsReadOnly="True" HeaderStyle="{StaticResource dataGridHeaderStyle}" />
                            <DataGridTextColumn Header="rating" Binding="{Binding UserMediaRating}" IsReadOnly="True" HeaderStyle="{StaticResource dataGridHeaderStyle}" />
                            <DataGridTextColumn Header="path" Binding="{Binding Path}" IsReadOnly="True" HeaderStyle="{StaticResource dataGridHeaderStyle}" />
                            <DataGridTextColumn Header="mime type" Binding="{Binding MimeType}" IsReadOnly="True" HeaderStyle="{StaticResource dataGridHeaderStyle}" />
                            <DataGridTextColumn Header="Date Added" Binding="{Binding DateAdded}" IsReadOnly="True" HeaderStyle="{StaticResource dataGridHeaderStyle}" />
                        </DataGrid.Columns>
                    </DataGrid>
                </Grid>
            </TabItem>
            <TabItem Header="album view" Background="Transparent" FontSize="14">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="250" />
                        <ColumnDefinition Width="*" />
                    </Grid.ColumnDefinitions>

                    <DataGrid 
                        x:Name="albumListBox2" 
                        SelectionChanged="albumListBox2_SelectionChanged" 
                        HeadersVisibility="Column" SelectionMode="Extended" 
                        AutoGenerateColumns="False" Background="White" 
                        RowStyle="{StaticResource dataGridRowStyle}"
                        ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                        GridLinesVisibility="None" 
                        Grid.Row="0" 
                        Grid.Column="0">
                        <DataGrid.ContextMenu>
                            <ContextMenu>
                                <MenuItem Header="Add to Now Playing" Click="addToNowPlayingAlbum2_OnClick" />
                                <MenuItem Header="Replace now playing with selection" Click="replaceNowPlayingAlbum2_OnClick" />
                                <Separator />
                                <MenuItem Header="Playlists">
                                    <MenuItem Header="Add to New Playlist" Click="addToNewPlaylistAlbum2_OnClick" />
                                    <MenuItem Header="Add to Playlist" Click="addToPlaylistAlbum2_OnClick" />
                                </MenuItem>
                                <Separator />
                                <MenuItem Header="Edit Album Information" Click="editAlbumInformation2_OnClick" />
                                <Separator />
                                <MenuItem Header="Delete">
                                    <MenuItem Header="Delete from Library" Click="deleteFromLibraryAlbum2_OnClick" />
                                    <MenuItem Header="Delete from Library and Computer" Click="deleteFromLibraryComputerAlbum2_OnClick" />
                                </MenuItem>
                            </ContextMenu>
                        </DataGrid.ContextMenu>

                        <DataGrid.Columns>
                            <DataGridTextColumn Header="Album" Binding="{Binding Tag.Album}" IsReadOnly="True" HeaderStyle="{StaticResource dataGridHeaderStyle}" />
                        </DataGrid.Columns>
                    </DataGrid>

                    <DataGrid 
                        x:Name="trackListBox2" 
                        HeadersVisibility="Column" 
                        SelectionMode="Extended"
                        AutoGenerateColumns="False" 
                        Background="White" 
                        RowStyle="{StaticResource dataGridRowStyle}"
                        GridLinesVisibility="Vertical" 
                        Grid.Row="1" 
                        Grid.Column="1">
                        <DataGrid.ContextMenu>
                            <ContextMenu>
                                <MenuItem Header="Add to Now Playing" Click="addToNowPlayingTrack2_OnClick" />
                                <MenuItem Header="Replace now playing with selection" Click="replaceNowPlayingTrack2_OnClick" />
                                <Separator />
                                <MenuItem Header="Playlists">
                                    <MenuItem Header="Add to New Playlist" Click="addToNewPlaylistTrack2_OnClick"  />
                                    <MenuItem Header="Add to Playlist" Click="addToPlaylistTrack2_OnClick" />
                                </MenuItem>
                                <Separator />
                                <MenuItem Header="Edit Track Information" Click="editTrackInformation2_OnClick" />
                                <Separator />
                                <MenuItem Header="Delete">
                                    <MenuItem Header="Delete from Library" Click="deleteFromLibraryTrack2_OnClick" />
                                    <MenuItem Header="Delete from Library and Computer" Click="deleteFromLibraryComputerTrack2_OnClick" />
                                </MenuItem>
                            </ContextMenu>
                        </DataGrid.ContextMenu>

                        <DataGrid.Columns>
                            <DataGridTextColumn Header="Track" Binding="{Binding Tag.Track}" IsReadOnly="True" HeaderStyle="{StaticResource dataGridHeaderStyle}" />
                            <DataGridTextColumn Header="Title" Binding="{Binding Tag.Title}" IsReadOnly="True" HeaderStyle="{StaticResource dataGridHeaderStyle}" />
                            <DataGridTextColumn Header="Artist" Binding="{Binding Tag.AlbumArtist}" IsReadOnly="True" HeaderStyle="{StaticResource dataGridHeaderStyle}" />
                            <DataGridTextColumn Header="Genre" Binding="{Binding Tag.Genre}" IsReadOnly="True" HeaderStyle="{StaticResource dataGridHeaderStyle}" />
                            <DataGridTextColumn Header="Play Count" Binding="{Binding PlayCount}" IsReadOnly="True" HeaderStyle="{StaticResource dataGridHeaderStyle}" />
                            <DataGridTextColumn Header="Rating" Binding="{Binding UserMediaRating}" IsReadOnly="True" HeaderStyle="{StaticResource dataGridHeaderStyle}" />
                            <DataGridTextColumn Header="Path" Binding="{Binding Path}" IsReadOnly="True" HeaderStyle="{StaticResource dataGridHeaderStyle}" />
                            <DataGridTextColumn Header="Mime Type" Binding="{Binding MimeType}" IsReadOnly="True" HeaderStyle="{StaticResource dataGridHeaderStyle}" />
                            <DataGridTextColumn Header="Date Added" Binding="{Binding DateAdded}" IsReadOnly="True" HeaderStyle="{StaticResource dataGridHeaderStyle}" />
                        </DataGrid.Columns>
                    </DataGrid>
                </Grid>
            </TabItem>
            <TabItem Header="song view" Background="Transparent" FontSize="14">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*" />
                    </Grid.ColumnDefinitions>

                    <DataGrid 
                        x:Name="trackListBox3" 
                        HeadersVisibility="Column" 
                        SelectionMode="Extended" 
                        AutoGenerateColumns="False" 
                        Background="White" 
                        RowStyle="{StaticResource dataGridRowStyle}"
                        GridLinesVisibility="Vertical" 
                        SelectionChanged="trackListBox3_SelectionChanged">
                        <DataGrid.ContextMenu>
                            <ContextMenu>
                                <MenuItem Header="Add to Now Playing" Click="addToNowPlayingTrack3_OnClick" />
                                <MenuItem Header="Replace now playing with selection" Click="replaceNowPlayingTrack3_OnClick" />
                                <Separator />
                                <MenuItem Header="Playlists">
                                    <MenuItem Header="Add to New Playlist" Click="addToNewPlaylistTrack3_OnClick"  />
                                    <MenuItem Header="Add to Playlist" Click="addToPlaylistTrack3_OnClick" />
                                </MenuItem>
                                <Separator />
                                <MenuItem Header="Edit Track Information" Click="editTrackInformation3_OnClick" />
                                <Separator />
                                <MenuItem Header="Delete">
                                    <MenuItem Header="Delete from Library" Click="deleteFromLibraryTrack3_OnClick" />
                                    <MenuItem Header="Delete from Library and Computer" Click="deleteFromLibraryComputerTrack3_OnClick" />
                                </MenuItem>
                            </ContextMenu>
                        </DataGrid.ContextMenu>

                        <DataGrid.Columns>
                            <DataGridTextColumn Header="Track" Binding="{Binding Tag.Track}" IsReadOnly="True" HeaderStyle="{StaticResource dataGridHeaderStyle}" />
                            <DataGridTextColumn Header="Title" Binding="{Binding Tag.Title}" IsReadOnly="True" HeaderStyle="{StaticResource dataGridHeaderStyle}" />
                            <DataGridTextColumn Header="Album" Binding="{Binding Tag.Album}" IsReadOnly="True" HeaderStyle="{StaticResource dataGridHeaderStyle}" />
                            <DataGridTextColumn Header="Artist" Binding="{Binding Tag.AlbumArtist}" IsReadOnly="True" HeaderStyle="{StaticResource dataGridHeaderStyle}" />
                            <DataGridTextColumn Header="Play Count" Binding="{Binding PlayCount}" IsReadOnly="True" HeaderStyle="{StaticResource dataGridHeaderStyle}" />
                            <DataGridTextColumn Header="Rating" Binding="{Binding UserMediaRating}" IsReadOnly="True" HeaderStyle="{StaticResource dataGridHeaderStyle}" />
                            <DataGridTextColumn Header="Path" Binding="{Binding Path}" IsReadOnly="True" HeaderStyle="{StaticResource dataGridHeaderStyle}" />
                            <DataGridTextColumn Header="Mime Type" Binding="{Binding MimeType}" IsReadOnly="True" HeaderStyle="{StaticResource dataGridHeaderStyle}" />
                            <DataGridTextColumn Header="Date Added" Binding="{Binding DateAdded}" IsReadOnly="True" HeaderStyle="{StaticResource dataGridHeaderStyle}" />
                        </DataGrid.Columns>
                    </DataGrid>
                </Grid>
            </TabItem>
            <TabItem Header="year view" Background="Transparent" FontSize="14">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="150" />
                        <ColumnDefinition Width="200" />
                        <ColumnDefinition Width="250" />
                        <ColumnDefinition Width="*" />
                    </Grid.ColumnDefinitions>

                    <DataGrid 
                        x:Name="yearListBox4" 
                        HeadersVisibility="Column" 
                        SelectionMode="Extended" 
                        AutoGenerateColumns="False" 
                        Background="White" 
                        RowStyle="{StaticResource dataGridRowStyle}"
                        ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                        GridLinesVisibility="None" 
                        SelectionChanged="yearListBox4_SelectionChanged" 
                        Grid.Row="1" 
                        Grid.Column="0">
                        <DataGrid.ContextMenu>
                            <ContextMenu>
                                <MenuItem Header="Add to Now Playing" Click="addToNowPlayingYear4_OnClick" />
                                <MenuItem Header="Replace now playing with selection" Click="replaceNowPlayingYear4_OnClick" />
                                <Separator />
                                <MenuItem Header="Playlists">
                                    <MenuItem Header="Add to New Playlist" Click="addToNewPlaylistYear4_OnClick"  />
                                    <MenuItem Header="Add to Playlist" Click="addToPlaylistYear4_OnClick" />
                                </MenuItem>
                                <Separator />
                                <MenuItem Header="Delete">
                                    <MenuItem Header="Delete from Library" Click="deleteFromLibraryYear4_OnClick" />
                                    <MenuItem Header="Delete from Library and Computer" Click="deleteFromLibraryComputerYear4_OnClick" />
                                </MenuItem>
                            </ContextMenu>
                        </DataGrid.ContextMenu>

                        <DataGrid.Columns>
                            <DataGridTextColumn Header="Year" Binding="{Binding Tag.Year}" IsReadOnly="True" HeaderStyle="{StaticResource dataGridHeaderStyle}" />
                        </DataGrid.Columns>
                    </DataGrid>

                    <DataGrid 
                        x:Name="artistListBox4" 
                        HeadersVisibility="Column" 
                        SelectionMode="Extended" 
                        AutoGenerateColumns="False" 
                        Background="White" 
                        RowStyle="{StaticResource dataGridRowStyle}"
                        ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                        GridLinesVisibility="None" 
                        SelectionChanged="artistListBox4_SelectionChanged" 
                        Grid.Row="1" 
                        Grid.Column="1">
                        <DataGrid.ContextMenu>
                            <ContextMenu>
                                <MenuItem Header="Add to Now Playing" Click="addToNowPlayingArtist4_OnClick" />
                                <MenuItem Header="Replace now playing with selection" Click="replaceNowPlayingArtist4_OnClick" />
                                <Separator />
                                <MenuItem Header="Playlists">
                                    <MenuItem Header="Add to New Playlist" Click="addToNewPlaylistArtist4_OnClick"  />
                                    <MenuItem Header="Add to Playlist" Click="addToPlaylistArtist4_OnClick" />
                                </MenuItem>
                                <Separator />
                                <MenuItem Header="Edit Artist Information" Click="editArtistInformation4_OnClick" />
                                <Separator />
                                <MenuItem Header="Delete">
                                    <MenuItem Header="Delete from Library" Click="deleteFromLibraryArtist4_OnClick" />
                                    <MenuItem Header="Delete from Library and Computer" Click="deleteFromLibraryComputerArtist4_OnClick" />
                                </MenuItem>
                            </ContextMenu>
                        </DataGrid.ContextMenu>

                        <DataGrid.Columns>
                            <DataGridTextColumn Header="Artist" Binding="{Binding Tag.AlbumArtist}" IsReadOnly="True" HeaderStyle="{StaticResource dataGridHeaderStyle}" />
                        </DataGrid.Columns>
                    </DataGrid>

                    <DataGrid 
                        x:Name="albumListBox4" 
                        HeadersVisibility="Column" 
                        SelectionMode="Extended" 
                        AutoGenerateColumns="False" 
                        Background="White" 
                        RowStyle="{StaticResource dataGridRowStyle}"
                        ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                        GridLinesVisibility="None" 
                        SelectionChanged="albumListBox4_SelectionChanged" 
                        Grid.Row="1" 
                        Grid.Column="2">
                        <DataGrid.ContextMenu>
                            <ContextMenu>
                                <MenuItem Header="Add to Now Playing" Click="addToNowPlayingAlbum4_OnClick" />
                                <MenuItem Header="Replace now playing with selection" Click="replaceNowPlayingAlbum4_OnClick" />
                                <Separator />
                                <MenuItem Header="Playlists">
                                    <MenuItem Header="Add to New Playlist" Click="addToNewPlaylistAlbum4_OnClick"  />
                                    <MenuItem Header="Add to Playlist" Click="addToPlaylistAlbum4_OnClick" />
                                </MenuItem>
                                <Separator />
                                <MenuItem Header="Edit Album Information" Click="editAlbumInformation4_OnClick" />
                                <Separator />
                                <MenuItem Header="Delete">
                                    <MenuItem Header="Delete from Library" Click="deleteFromLibraryAlbum4_OnClick" />
                                    <MenuItem Header="Delete from Library and Computer" Click="deleteFromLibraryComputerAlbum4_OnClick" />
                                </MenuItem>
                            </ContextMenu>
                        </DataGrid.ContextMenu>

                        <DataGrid.Columns>
                            <DataGridTextColumn Header="Album" Binding="{Binding Tag.Album}" IsReadOnly="True" HeaderStyle="{StaticResource dataGridHeaderStyle}" />
                        </DataGrid.Columns>
                    </DataGrid>

                    <DataGrid 
                        x:Name="trackListBox4" 
                        HeadersVisibility="Column" 
                        SelectionMode="Extended" 
                        AutoGenerateColumns="False" 
                        Background="White" 
                        RowStyle="{StaticResource dataGridRowStyle}"
                        GridLinesVisibility="Vertical" 
                        SelectionChanged="trackListBox4_SelectionChanged"
                        Grid.Row="1"
                        Grid.Column="3">
                        <DataGrid.ContextMenu>
                            <ContextMenu>
                                <MenuItem Header="Add to Now Playing" Click="addToNowPlayingTrack4_OnClick" />
                                <MenuItem Header="Replace now playing with selection" Click="replaceNowPlayingTrack4_OnClick" />
                                <Separator />
                                <MenuItem Header="Playlists">
                                    <MenuItem Header="Add to New Playlist" Click="addToNewPlaylistTrack4_OnClick"  />
                                    <MenuItem Header="Add to Playlist" Click="addToPlaylistTrack4_OnClick" />
                                </MenuItem>
                                <Separator />
                                <MenuItem Header="Edit Track Information" Click="editTrackInformation4_OnClick" />
                                <Separator />
                                <MenuItem Header="Delete">
                                    <MenuItem Header="Delete from Library" Click="deleteFromLibraryTrack4_OnClick" />
                                    <MenuItem Header="Delete from Library and Computer" Click="deleteFromLibraryComputerTrack4_OnClick" />
                                </MenuItem>
                            </ContextMenu>
                        </DataGrid.ContextMenu>

                        <DataGrid.Columns>
                            <DataGridTextColumn Header="Track" Binding="{Binding Tag.Track}" IsReadOnly="True" HeaderStyle="{StaticResource dataGridHeaderStyle}" />
                            <DataGridTextColumn Header="Title" Binding="{Binding Tag.Title}" IsReadOnly="True" HeaderStyle="{StaticResource dataGridHeaderStyle}" />
                            <DataGridTextColumn Header="Play Count" Binding="{Binding PlayCount}" IsReadOnly="True" HeaderStyle="{StaticResource dataGridHeaderStyle}" />
                            <DataGridTextColumn Header="Rating" Binding="{Binding UserMediaRating}" IsReadOnly="True" HeaderStyle="{StaticResource dataGridHeaderStyle}" />
                            <DataGridTextColumn Header="Path" Binding="{Binding Path}" IsReadOnly="True" HeaderStyle="{StaticResource dataGridHeaderStyle}" />
                            <DataGridTextColumn Header="Mime Type" Binding="{Binding MimeType}" IsReadOnly="True" HeaderStyle="{StaticResource dataGridHeaderStyle}" />
                            <DataGridTextColumn Header="Date Added" Binding="{Binding DateAdded}" IsReadOnly="True" HeaderStyle="{StaticResource dataGridHeaderStyle}" />
                        </DataGrid.Columns>
                    </DataGrid>
                </Grid>
            </TabItem>
            <TabItem Header="genre view" Background="Transparent" FontSize="14">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="150" />
                        <ColumnDefinition Width="200" />
                        <ColumnDefinition Width="250" />
                        <ColumnDefinition Width="*" />
                    </Grid.ColumnDefinitions>

                    <DataGrid 
                        x:Name="genreListBox5" 
                        HeadersVisibility="Column" 
                        SelectionMode="Extended" 
                        AutoGenerateColumns="False" 
                        Background="White" 
                        RowStyle="{StaticResource dataGridRowStyle}"
                        ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                        GridLinesVisibility="None" 
                        SelectionChanged="genreListBox5_SelectionChanged" 
                        Grid.Row="1" 
                        Grid.Column="0">
                        
                        <DataGrid.ContextMenu>
                            <ContextMenu>
                                <MenuItem Header="Add to Now Playing" Click="addToNowPlayingGenre5_OnClick" />
                                <MenuItem Header="Replace now playing with selection" Click="replaceNowPlayingGenre5_OnClick" />
                                <Separator />
                                <MenuItem Header="Playlists">
                                    <MenuItem Header="Add to New Playlist" Click="addToNewPlaylistGenre5_OnClick"  />
                                    <MenuItem Header="Add to Playlist" Click="addToPlaylistGenre5_OnClick" />
                                </MenuItem>
                                <Separator />
                                <MenuItem Header="Delete">
                                    <MenuItem Header="Delete from Library" Click="deleteFromLibraryGenre5_OnClick" />
                                    <MenuItem Header="Delete from Library and Computer" Click="deleteFromLibraryComputerGenre5_OnClick" />
                                </MenuItem>
                            </ContextMenu>
                        </DataGrid.ContextMenu>

                        <DataGrid.Columns>
                            <DataGridTextColumn Header="Genre" Binding="{Binding Tag.Genre}" IsReadOnly="True" HeaderStyle="{StaticResource dataGridHeaderStyle}" />
                        </DataGrid.Columns>
                    </DataGrid>
                    
                    <DataGrid 
                        x:Name="artistListBox5" 
                        HeadersVisibility="Column" 
                        SelectionMode="Extended" 
                        AutoGenerateColumns="False" 
                        Background="White" 
                        RowStyle="{StaticResource dataGridRowStyle}"
                        ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                        GridLinesVisibility="None" 
                        SelectionChanged="artistListBox5_SelectionChanged" 
                        Grid.Row="1" 
                        Grid.Column="1">
                        <DataGrid.ContextMenu>
                            <ContextMenu>
                                <MenuItem Header="Add to Now Playing" Click="addToNowPlayingArtist5_OnClick" />
                                <MenuItem Header="Replace now playing with selection" Click="replaceNowPlayingArtist5_OnClick" />
                                <Separator />
                                <MenuItem Header="Playlists">
                                    <MenuItem Header="Add to New Playlist" Click="addToNewPlaylistArtist5_OnClick"  />
                                    <MenuItem Header="Add to Playlist" Click="addToPlaylistArtist5_OnClick" />
                                </MenuItem>
                                <Separator />
                                <MenuItem Header="Edit Artist Information" Click="editArtistInformation5_OnClick" />
                                <Separator />
                                <MenuItem Header="Delete">
                                    <MenuItem Header="Delete from Library" Click="deleteFromLibraryArtist5_OnClick" />
                                    <MenuItem Header="Delete from Library and Computer" Click="deleteFromLibraryComputerArtist5_OnClick" />
                                </MenuItem>
                            </ContextMenu>
                        </DataGrid.ContextMenu>

                        <DataGrid.Columns>
                            <DataGridTextColumn Header="Artist" Binding="{Binding Tag.AlbumArtist}" IsReadOnly="True" HeaderStyle="{StaticResource dataGridHeaderStyle}" />
                        </DataGrid.Columns>
                    </DataGrid>
                    
                    <DataGrid 
                        x:Name="albumListBox5" 
                        HeadersVisibility="Column"
                        SelectionMode="Extended" 
                        AutoGenerateColumns="False"
                        Background="White" 
                        RowStyle="{StaticResource dataGridRowStyle}"
                        ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                        GridLinesVisibility="None" 
                        SelectionChanged="albumListBox5_SelectionChanged"
                        Grid.Row="1" 
                        Grid.Column="2">
                        
                        <DataGrid.ContextMenu>
                            <ContextMenu>
                                <MenuItem Header="Add to Now Playing" Click="addToNowPlayingAlbum5_OnClick" />
                                <MenuItem Header="Replace now playing with selection" Click="replaceNowPlayingAlbum5_OnClick" />
                                <Separator />
                                <MenuItem Header="Playlists">
                                    <MenuItem Header="Add to New Playlist" Click="addToNewPlaylistAlbum5_OnClick"  />
                                    <MenuItem Header="Add to Playlist" Click="addToPlaylistAlbum5_OnClick" />
                                </MenuItem>
                                <Separator />
                                <MenuItem Header="Edit Album Information" Click="editAlbumInformation5_OnClick" />
                                <Separator />
                                <MenuItem Header="Delete">
                                    <MenuItem Header="Delete from Library" Click="deleteFromLibraryAlbum5_OnClick" />
                                    <MenuItem Header="Delete from Library and Computer" Click="deleteFromLibraryComputerAlbum5_OnClick" />
                                </MenuItem>
                            </ContextMenu>
                        </DataGrid.ContextMenu>

                        <DataGrid.Columns>
                            <DataGridTextColumn Header="Album" Binding="{Binding Tag.Album}" IsReadOnly="True" HeaderStyle="{StaticResource dataGridHeaderStyle}" />
                        </DataGrid.Columns>
                    </DataGrid>
                    
                    <DataGrid 
                        x:Name="trackListBox5"
                        HeadersVisibility="Column" 
                        SelectionMode="Extended" 
                        AutoGenerateColumns="False" 
                        Background="White" 
                        RowStyle="{StaticResource dataGridRowStyle}"
                        GridLinesVisibility="Vertical" 
                        SelectionChanged="trackListBox5_SelectionChanged" 
                        Grid.Row="1" 
                        Grid.Column="3">
                        <DataGrid.ContextMenu>
                            <ContextMenu>
                                <MenuItem Header="Add to Now Playing" Click="addToNowPlayingTrack5_OnClick" />
                                <MenuItem Header="Replace now playing with selection" Click="replaceNowPlayingTrack5_OnClick" />
                                <Separator />
                                <MenuItem Header="Playlists">
                                    <MenuItem Header="Add to New Playlist" Click="addToNewPlaylistTrack5_OnClick"  />
                                    <MenuItem Header="Add to Playlist" Click="addToPlaylistTrack5_OnClick" />
                                </MenuItem>
                                <Separator />
                                <MenuItem Header="Edit Track Information" Click="editTrackInformation5_OnClick" />
                                <Separator />
                                <MenuItem Header="Delete">
                                    <MenuItem Header="Delete from Library" Click="deleteFromLibraryTrack5_OnClick" />
                                    <MenuItem Header="Delete from Library and Computer" Click="deleteFromLibraryComputerTrack5_OnClick" />
                                </MenuItem>
                            </ContextMenu>
                        </DataGrid.ContextMenu>

                        <DataGrid.Columns>
                            <DataGridTextColumn Header="Track" Binding="{Binding Tag.Track}" IsReadOnly="True" HeaderStyle="{StaticResource dataGridHeaderStyle}" />
                            <DataGridTextColumn Header="Title" Binding="{Binding Tag.Title}" IsReadOnly="True" HeaderStyle="{StaticResource dataGridHeaderStyle}" />
                            <DataGridTextColumn Header="Play Count" Binding="{Binding PlayCount}" IsReadOnly="True" HeaderStyle="{StaticResource dataGridHeaderStyle}" />
                            <DataGridTextColumn Header="Rating" Binding="{Binding UserMediaRating}" IsReadOnly="True" HeaderStyle="{StaticResource dataGridHeaderStyle}" />
                            <DataGridTextColumn Header="Path" Binding="{Binding Path}" IsReadOnly="True" HeaderStyle="{StaticResource dataGridHeaderStyle}" />
                            <DataGridTextColumn Header="Mime Type" Binding="{Binding MimeType}" IsReadOnly="True" HeaderStyle="{StaticResource dataGridHeaderStyle}" />
                            <DataGridTextColumn Header="Date Added" Binding="{Binding DateAdded}" IsReadOnly="True" HeaderStyle="{StaticResource dataGridHeaderStyle}" />
                        </DataGrid.Columns>
                    </DataGrid>
                </Grid>
            </TabItem>

            <TabItem Header="folder view" Background="Transparent" FontSize="14">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="300" />
                        <ColumnDefinition Width="*" />
                    </Grid.ColumnDefinitions>

                    <TreeView x:Name="musicTreeView" Grid.Column="0">
                        <TreeView.ContextMenu>
                            <ContextMenu>
                                <MenuItem Header="Add to Now Playing" Click="addToNowPlayingTree6_OnClick" />
                                <MenuItem Header="Replace now playing with selection" Click="replaceNowPlayingTree6_OnClick" />
                                <Separator />
                                <MenuItem Header="Playlists">
                                    <MenuItem Header="Add to New Playlist" Click="addToNewPlaylistTree6_OnClick"  />
                                    <MenuItem Header="Add to Playlist" Click="addToPlaylistTree6_OnClick" />
                                </MenuItem>
                                <Separator />
                                <MenuItem Header="Delete">
                                    <MenuItem Header="Delete from Library" Click="deleteFromLibraryTree6_OnClick" />
                                    <MenuItem Header="Delete from Library and Computer" Click="deleteFromLibraryComputerTree6_OnClick" />
                                </MenuItem>
                            </ContextMenu>
                        </TreeView.ContextMenu>
                    </TreeView>

                    <DataGrid 
                        x:Name="trackListBox6"
                        Grid.Column="1"
                        HeadersVisibility="Column" 
                        SelectionMode="Extended" 
                        AutoGenerateColumns="False" 
                        Background="White" 
                        RowStyle="{StaticResource dataGridRowStyle}"
                        GridLinesVisibility="Vertical" 
                        SelectionChanged="musicListBox_SelectionChanged">
                        
                        <DataGrid.ContextMenu>
                            <ContextMenu>
                                <MenuItem Header="Add to Now Playing" Click="addToNowPlayingTrack6_OnClick" />
                                <MenuItem Header="Replace now playing with selection" Click="replaceNowPlayingTrack6_OnClick" />
                                <Separator />
                                <MenuItem Header="Playlists">
                                    <MenuItem Header="Add to New Playlist" Click="addToNewPlaylistTrack6_OnClick"  />
                                    <MenuItem Header="Add to Playlist" Click="addToPlaylistTrack6_OnClick" />
                                </MenuItem>
                                <Separator />
                                <MenuItem Header="Edit Track Information" Click="editTrackInformation6_OnClick" />
                                <Separator />
                                <MenuItem Header="Delete">
                                    <MenuItem Header="Delete from Library" Click="deleteFromLibraryTrack6_OnClick" />
                                    <MenuItem Header="Delete from Library and Computer" Click="deleteFromLibraryComputerTrack6_OnClick" />
                                </MenuItem>
                            </ContextMenu>
                        </DataGrid.ContextMenu>

                        <DataGrid.Columns>
                            <DataGridTextColumn Header="Track" Binding="{Binding Tag.Track}" IsReadOnly="True" HeaderStyle="{StaticResource dataGridHeaderStyle}" />
                            <DataGridTextColumn Header="Title" Binding="{Binding Tag.Title}" IsReadOnly="True" HeaderStyle="{StaticResource dataGridHeaderStyle}" />
                            <DataGridTextColumn Header="Album" Binding="{Binding Tag.Album}" IsReadOnly="True" HeaderStyle="{StaticResource dataGridHeaderStyle}" />
                            <DataGridTextColumn Header="Artist" Binding="{Binding Tag.AlbumArtist}" IsReadOnly="True" HeaderStyle="{StaticResource dataGridHeaderStyle}" />
                            <DataGridTextColumn Header="Play Count" Binding="{Binding PlayCount}" IsReadOnly="True" HeaderStyle="{StaticResource dataGridHeaderStyle}" />
                            <DataGridTextColumn Header="Rating" Binding="{Binding UserMediaRating}" IsReadOnly="True" HeaderStyle="{StaticResource dataGridHeaderStyle}" />
                            <DataGridTextColumn Header="Path" Binding="{Binding Path}" IsReadOnly="True" HeaderStyle="{StaticResource dataGridHeaderStyle}" />
                            <DataGridTextColumn Header="Mime Type" Binding="{Binding MimeType}" IsReadOnly="True" HeaderStyle="{StaticResource dataGridHeaderStyle}" />
                            <DataGridTextColumn Header="Date Added" Binding="{Binding DateAdded}" IsReadOnly="True" HeaderStyle="{StaticResource dataGridHeaderStyle}" />
                        </DataGrid.Columns>
                    </DataGrid>
                </Grid>
            </TabItem>
            <TabItem Header="recently added" Background="Transparent" FontSize="14">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*" />
                    </Grid.ColumnDefinitions>

                    <DataGrid 
                        x:Name="trackListBox7" 
                        HeadersVisibility="Column" 
                        SelectionMode="Extended" 
                        AutoGenerateColumns="False" 
                        Background="White" 
                        RowStyle="{StaticResource dataGridRowStyle}"
                        GridLinesVisibility="Vertical" 
                        SelectionChanged="trackListBox7_SelectionChanged">
                        <DataGrid.ContextMenu>
                            <ContextMenu>
                                <MenuItem Header="Add to Now Playing" Click="addToNowPlayingTrack7_OnClick" />
                                <MenuItem Header="Replace now playing with selection" Click="replaceNowPlayingTrack7_OnClick" />
                                <Separator />
                                <MenuItem Header="Playlists">
                                    <MenuItem Header="Add to New Playlist" Click="addToNewPlaylistTrack7_OnClick"  />
                                    <MenuItem Header="Add to Playlist" Click="addToPlaylistTrack7_OnClick" />
                                </MenuItem>
                                <Separator />
                                <MenuItem Header="Edit Track Information" Click="editTrackInformation7_OnClick" />
                                <Separator />
                                <MenuItem Header="Delete">
                                    <MenuItem Header="Delete from Library" Click="deleteFromLibraryTrack7_OnClick" />
                                    <MenuItem Header="Delete from Library and Computer" Click="deleteFromLibraryComputerTrack7_OnClick" />
                                </MenuItem>
                            </ContextMenu>
                        </DataGrid.ContextMenu>

                        <DataGrid.Columns>
                            <DataGridTextColumn Header="Track" Binding="{Binding Tag.Track}" IsReadOnly="True" HeaderStyle="{StaticResource dataGridHeaderStyle}" />
                            <DataGridTextColumn Header="Title" Binding="{Binding Tag.Title}" IsReadOnly="True" HeaderStyle="{StaticResource dataGridHeaderStyle}" />
                            <DataGridTextColumn Header="Album" Binding="{Binding Tag.Album}" IsReadOnly="True" HeaderStyle="{StaticResource dataGridHeaderStyle}" />
                            <DataGridTextColumn Header="Artist" Binding="{Binding Tag.AlbumArtist}" IsReadOnly="True" HeaderStyle="{StaticResource dataGridHeaderStyle}" />
                            <DataGridTextColumn Header="Play Count" Binding="{Binding PlayCount}" IsReadOnly="True" HeaderStyle="{StaticResource dataGridHeaderStyle}" />
                            <DataGridTextColumn Header="Rating" Binding="{Binding UserMediaRating}" IsReadOnly="True" HeaderStyle="{StaticResource dataGridHeaderStyle}" />
                            <DataGridTextColumn Header="Path" Binding="{Binding Path}" IsReadOnly="True" HeaderStyle="{StaticResource dataGridHeaderStyle}" />
                            <DataGridTextColumn Header="Mime Type" Binding="{Binding MimeType}" IsReadOnly="True" HeaderStyle="{StaticResource dataGridHeaderStyle}" />
                            <DataGridTextColumn Header="Date Added" Binding="{Binding DateAdded}" IsReadOnly="True" HeaderStyle="{StaticResource dataGridHeaderStyle}" />
                        </DataGrid.Columns>
                    </DataGrid>
                </Grid>
            </TabItem>
        </TabControl>
        <Grid Grid.Row="1" Margin="0,5,0,0" >
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="85" />
                <ColumnDefinition Width="90" />
                <ColumnDefinition Width="90" />
                <ColumnDefinition Width="90" />
                <ColumnDefinition Width="90" />
                <ColumnDefinition Width="*" />                
            </Grid.ColumnDefinitions>

            <Button x:Name="refreshButton" Grid.Column="0" Click="refreshButton_Click">Refresh Library</Button>

            <Label x:Name="artistCounterLabel" Grid.Column="1" Margin="0,0,0,0" />

            <Label x:Name="albumCounterLabel" Grid.Column="2" Margin="0,0,0,0" />

            <Label x:Name="trackCounterLabel" Grid.Column="3" Margin="0,0,0,0" />

            <Label x:Name="genreCounterLabel" Grid.Column="4" Margin="0,0,0,0" />

            <Label x:Name="currentlyScanning" Grid.Column="5" HorizontalAlignment="Right" Margin="0,0,0,0" />
        </Grid>
    </Grid>
</Page>
